/*
Java source file
Copyright: David Leeb 2011
*/
package com.david.documentation.service.mail;

public enum MailAccounts {
    //GMX("mail.gmx.at", 25, "login", "passwort", "MealChecker"),
    GOOGLEMAIL("smtp.googlemail.com", 25, "mealchecker.tu@gmail.com", "MealCheckerTu", "MealChecker")
    ;

    private String smtpHost;
    private int port;
    private String username;
    private String password;
    private String email;

    /**
     * Setzt die notwendigen Attribute des MailAccounts
     *
     * @param smtpHost - SMTP Host
     * @param port     - Port
     * @param username - Benutzername
     * @param password - Passwort
     * @param email    - Absender E-Mail
     */
    private MailAccounts(String smtpHost, int port, String username, String password, String email) {
        this.smtpHost = smtpHost;
        this.port = port;
        this.username = username;
        this.password = password;
        this.email = email;
    }

    public int getPort() {
        return port;
    }

    public String getSmtpHost() {
        return smtpHost;
    }

    public MailAuthenticator getPasswordAuthentication() {
        return new MailAuthenticator(username, password);
    }

    public String getEmail() {
        return email;
    }


}
